<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<%@taglib uri="/WEB-INF/dianning.tld" prefix="dianning"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="/css/top.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
<link href="/css/index.css" rel="stylesheet" type="text/css" />
<link href="/css/vip.css" rel="stylesheet" type="text/css" />
<link href="/css/avatar.css" rel="stylesheet" type="text/css" />
<link href="/css/validator.css" rel="stylesheet" type="text/css" />
<style type="text/css"> 
.bbit-usbox
{      
    margin:20px;
    padding:2px;    
    display:block;
}
.bbit-usbox .bbit-usbox-item
{
    width:auto;
    margin-left:10px;
    margin-top:2px;
    background-color:#e0e5ee;    
    border: solid 1px #ccd5e4;    
    float:left;   
    white-space : nowrap;
}
.bbit-usbox .bbit-usbox-item a
{
    color:#000; 
    text-decoration:none;
    padding-left:2px;
}
.bbit-usbox .bbit-usbox-item a span
{  
font-size:12px;font-family:Tahoma,Verdana,STHeiTi,simsun,sans-serif
}
.bbit-usbox .bbit-usbox-del
{
    cursor:pointer;
    border:none;
    vertical-align:middle; 
    margin:0px 5px;
}
</style> 
<script type="text/javascript" charset="utf-8" src="/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/jquery_last.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/formValidator.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/formValidatorRegex.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/DateTimeMask.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/photoupload.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/popup.js"></script>
<script type="text/javascript">
function additem(){
var name=$("#ccid").find("option:selected").text();
var ccid=$("#ccid").val();
var temp = "<div class='bbit-usbox-item' title='点击删除'><a href='javascript:void(0);' onclick='$(this).parent().remove();'><span>"+name+"</span><input type='hidden' name='ccids' value='"+ccid+"'/><img src='/images/del.gif' class='bbit-usbox-del'/></a></div>";
$('#usbox').append(temp);

}

</script> 
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" type="images/gif" href="animated_favicon1.gif" />
<title>点宁网[<dianning:webinfo type="area"/>分类信息]<dianning:webinfo type="area"/>免费发布信息<dianning:webinfo type="poweredby"/></title>
<meta name="Description" content="<dianning:webinfo type="area"/>分类信息网为您提供<dianning:webinfo type="area"/>分类信息，您可以免费发布和查询求职招聘,兼职,房屋出租,二手市场,生活服务,兼职,黄页等分类信息."/>
<meta name="Keywords" content="<dianning:webinfo type="area"/>免费发布信息, <dianning:webinfo type="area"/>分类信息, <dianning:webinfo type="area"/>信息港, <dianning:webinfo type="area"/>热线, <dianning:webinfo type="area"/>免费发布广告，<dianning:webinfo type="area"/>114"/>
</head>
<body>
<div class="bgtop">
<s:include value="/top.jsp" />
</div>
<div class="content">
<s:include value="/WEB-INF/jsp/user/left.jsp" />
<div class="vipr"><h2><a href="profile.action">商家网店</a><font style="margin:0px 20px;">网店内容管理</font></h2>
	<ul class="viprheight">
   <div class="caption">
<s:if test="profile.status==0"> 
<h4>请与管理员联系开通个人主页</h4> 
</s:if>
<s:if test="profile.status==3"> 
<h4>您的个人主页己被禁用</h4>
</s:if>
</div>
<div class="vipr1">
  <h4>修改网店资料信息</h4></div>
<form name="update" id="update" method="post" action="/user/profile.action">
<s:hidden name="action"/>
<TABLE  class="grpic mt20" border=0 cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <TD width="20%" align=right><SPAN class=red>*</SPAN>所属频道： </TD>
    <TD align=left>
    <s:if test="bigChannelList != null">
    <s:iterator id="c" value="%{bigChannelList}" status="st" >
	<label><input id="cid<s:property value="#c.id"/>" name="cid"  value="<s:property value="#c.id"/>" type="radio" <s:if test="profile.cid==#c.id">checked='checked'</s:if> onclick="onchannel(<s:property value="#c.id"/>);"><s:property value="#c.channel.channelName"/></label>
		</s:iterator>
	</s:if>
    <span id="cidTip"></span></TD>
</TR>
<TR>
    <TD align=right><SPAN class=red>*</SPAN> 类&nbsp;&nbsp;&nbsp;&nbsp;别： </TD>
    <TD align=left>
	<s:select list="smallChannelList" name="ccid" id="ccid" listKey="key" listValue="value"></s:select>
	<a href='javascript:void(0);' onclick="additem();">添加</a> <span class="hui333">(选好类别后，点添加，即生成网店中栏目)</span></TD>
</TR>
<TR>
    <TD align=right><SPAN class=red>*</SPAN> 所选类别： </TD>
    <TD height="30" align=left class="bbit-usbox" id="usbox">
    <s:if test="profile.ccidList != null">
	<s:iterator id="cc" value="%{profile.ccidList}" >
	<div class='bbit-usbox-item' title='点击删除'><a href='javascript:void(0);' onclick='$(this).parent().remove();'><span><s:property value="#cc.channel.channelName"/></span><input type='hidden' name='ccids' value='<s:property value="#cc.id"/>'/><img src='/images/del.gif' class='bbit-usbox-del'/></a></div>
	</s:iterator>
	</s:if>
	</TD>
</TR>
<TR>
    <TD align=right></TD>
    <TD height="30" align=left>
    <INPUT id=btnSubmit class=grsub value=保存修改 type=submit name=btnSubmit />
	</TD>
</TR>
<TR>
    <TD align=right>&nbsp;</TD>
    <TD height="30" align=left class="red12" ><strong> </strong>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="13%" rowspan="2" valign="top"><strong>注意事项：</strong></td>
          <td width="87%">1、网店类别最多添加6个小类，点击上面&quot;频道&quot;，选择所属&quot;类别&quot;，最后点击&quot;添加&quot;，添加多个小类重复上述步骤。</td>
        </tr>
        <tr>
          <td>2、网店帖子（商品信息)发布，在小类的列表页发布的帖子（免费发布信息）自动显示在网店对应的类别里。</td>
        </tr>
      </table></TD>
</TR>
<TR>
    <TD align=right valign="top"><SPAN class=red>*</SPAN> 网站样式： </TD>
    <TD align=left>
    <table width="100%" border="0" cellspacing="0" cellpadding="0"  class=wdstyle>
      <tr>
        <td align="center"><img src="/images/wd/vip1.jpg" /></td>
        <td align="center"><img src="/images/wd/vip2.jpg" /></td>
        <td align="center"><img src="/images/wd/vip3.jpg" /></td>
        <td align="center"><img src="/images/wd/vip4.jpg" /></td>
        </tr>
      <tr>
        <td height="30" align="center"><label><input id="style1" name="style"  value="1" type="radio" <s:if test="style==1">checked</s:if>/>1浪漫小屋</label></td>
        <td align="center"><label><input id="style2" name="style"  value="2" type="radio" <s:if test="style==2">checked</s:if>/>2粉色心情</label></td>
        <td align="center"><label><input id="style3" name="style"  value="3" type="radio" <s:if test="style==3">checked</s:if>/>3梦幻精灵</label></td>
        <td align="center"><label><input id="style4" name="style"  value="4" type="radio" <s:if test="style==1">checked</s:if>/>4酷黑地带</label></td>
      </tr>
      <tr>
        <td align="center"><img src="/images/wd/vip5.jpg" /></td>
        <td align="center"><img src="/images/wd/vip6.jpg" /></td>
        <td align="center"><img src="/images/wd/vip7.jpg" /></td>
        <td align="center"><img src="/images/wd/vip8.jpg" /</td>
      </tr>
      <tr>
        <td height="30" align="center"><label><input id="style5" name="style"  value="5" type="radio" <s:if test="style==5">checked</s:if>/>5亲近自然</label></td>
        <td align="center"><label><input id="style6" name="style"  value="6" type="radio" <s:if test="style==6">checked</s:if>/>6商业蓝色</label></td>
        <td align="center"><label><input id="style7" name="style"  value="7" type="radio" <s:if test="style==7">checked</s:if>/>7水墨丹青</label></td>
        <td align="center"><label><input id="style8" name="style"  value="8" type="radio" <s:if test="style==8">checked</s:if>/>8商业经典</label></td>
      </tr>
      </table>
	
	</TD>
</TR>
  <TR>
    <TD>&nbsp; </TD>
    <TD height="20" colSpan=2 align=left><INPUT id=btnSubmit class=grsub value=保存修改 type=submit name=btnSubmit> <a href="<s:property value="profileDomain"/>/<s:property value="profile.webkey"/>" target="_blank">保存后点击这里查看</a>    </TD></TR></TBODY></TABLE>
</form>
<s:if test="aboutnum<1">
<div class="vipr1"><a href="/user/profile.action?action=aboutadd"><img src="/images/use_add6.gif" width="243" height="46" /></a></div>
</s:if>
<div class="vipr1">
  <h4>管理商家网店首页信息</h4></div>
<DIV class=c></DIV>
<TABLE class=basetb border=0 cellSpacing=0 cellPadding=0 width="100%">
 <TBODY>
  <TR id=tablehead>
    <th width="500">消息内容 </th>
    <th width="100" class="tit_cz">操作 </th>
  </TR>
<s:if test="abouts != null">
<s:iterator id="about" value="%{abouts}" status="st" >
  <TR>
	<TD>
<dianning:write value="#about.content" length="20"/>
	</TD>
	<TD>
<a href="/user/profile.action?action=aboutupdate&id=<s:property value="#about.id"/>">修改</a> | <a href="/user/profile.action?action=vipdel&id=<s:property value="#about.id"/>" onclick="{if(confirm('执行此删除操作后该信息不能恢复，确定删除吗？')){return true;}return false;}">删除</a>
	</TD>
  </TR>
</s:iterator>
</s:if>
</TBODY></TABLE>

<s:if test="aptitudenum<6">
<div class="vipr1"><a href="/user/profile.action?action=aptitudeadd"><img src="/images/use_add2.gif" width="243" height="46" /></a></div>
</s:if>
<div class="vipr1">
  <h4>管理商家网店备注信息</h4></div>
<DIV class=c></DIV>
<TABLE class=basetb border=0 cellSpacing=0 cellPadding=0 width="100%">
 <TBODY>
  <TR id=tablehead>
    <th width="450">消息内容 </th>
    <th width="50">排序</th>
    <th width="100" class="tit_cz">操作 </th>
  </TR>
<s:if test="aptitudes != null">
<s:iterator id="aptitude" value="%{aptitudes}" status="st" >
  <TR>
	<TD>
<dianning:write value="#aptitude.content" length="20"/>
	</TD>
	<TD>
<s:property value="#aptitude.orders"/>	
	</TD>
	<TD>
<a href="/user/profile.action?action=aptitudeupdate&id=<s:property value="#aptitude.id"/>">修改</a> | <a href="/user/profile.action?action=vipdel&id=<s:property value="#aptitude.id"/>" onclick="{if(confirm('执行此删除操作后该信息不能恢复，确定删除吗？')){return true;}return false;}">删除</a>
	</TD>
  </TR>
</s:iterator>
</s:if>
</TBODY></TABLE>

<s:if test="commonum<6">
<div class="vipr1"><a href="/user/profile.action?action=commonadd"><img src="/images/use_add3.gif" width="243" height="46" /></a></div>
</s:if>
<div class="vipr1">
  <h4>管理商家网店常识信息</h4></div>

<DIV class=c></DIV>
<TABLE class=basetb border=0 cellSpacing=0 cellPadding=0 width="100%">
 <TBODY>
  <TR id=tablehead>
    <th width="450">消息内容 </th>
    <th width="50">排序</th>
    <th width="100" class="tit_cz">操作 </th>
  </TR>
<s:if test="commons != null">  
<s:iterator id="common" value="%{commons}" status="st" >
  <TR>
	<TD>
<dianning:write value="#common.content" length="20"/>
	</TD>
	<TD>
<s:property value="#common.orders"/>	
	</TD>
	<TD>
<a href="/user/profile.action?action=commonupdate&id=<s:property value="#common.id"/>">修改</a> | <a href="/user/profile.action?action=vipdel&id=<s:property value="#common.id"/>" onclick="{if(confirm('执行此删除操作后该信息不能恢复，确定删除吗？')){return true;}return false;}">删除</a>
	</TD>
  </TR>
</s:iterator>
</s:if>
</TBODY></TABLE>

<s:if test="linknum<6">
<div class="vipr1"><a href="/user/profile.action?action=linkadd"><img src="/images/use_add4.gif" width="243" height="46" /></a></div>
</s:if>
<div class="vipr1">
  <h4>管理商家平台信息</h4></div>

<DIV class=c></DIV>
<TABLE class=basetb border=0 cellSpacing=0 cellPadding=0 width="100%">
 <TBODY>
  <TR id=tablehead>
    <th width="450">平台内容 </th>
    <th width="50">排序</th>
    <th width="100" class="tit_cz">操作 </th>
  </TR>
<s:if test="links != null">   
<s:iterator id="link" value="%{links}" status="st" >
  <TR>
	<TD>
<dianning:write value="#link.title" length="20"/>
	</TD>
	<TD>
<s:property value="#link.orders"/>	
	</TD>
	<TD>
<a href="/user/profile.action?action=linkupdate&id=<s:property value="#link.id"/>">修改</a> | <a href="/user/profile.action?action=linkdel&id=<s:property value="#link.id"/>" onclick="{if(confirm('执行此删除操作后该信息不能恢复，确定删除吗？')){return true;}return false;}">删除</a>
	</TD>
  </TR>
</s:iterator>
</s:if>
</TBODY></TABLE>

<h3></h3></ul>
    </div>
    </div>    
<div class="content">
<s:include value="/foot.jsp" />
</div>
<script type="text/javascript">  
$(document).ready(function(){
	$.formValidator.initConfig({formid:"update",errorfocus: true});
	$("#webkey").formValidator({onshow:"请输入商家网站销售电话",onfocus: "只能填写数字"}).regexValidator({ regexp: "^\\S+$", onerror: "请输入商家网站销售电话" }).regexValidator({ regexp: "^[0-9]{5,20}$", onerror: "网站地址为9或10位电话号活手机号，区号后不要加-" });
	$("#name").formValidator({onshow:"请输入网店栏头",onfocus: "4-25个字，不允许填写电话和特殊符号"}).regexValidator({ regexp: "^[\\s\\S]*$", onerror: "不能填写电话和特殊符号！" }).regexValidator({ regexp: "^[\\s\\S]{6,}$", onerror: "网店栏头不足4个字!" }).regexValidator({ regexp: "^(.){4,25}$", onerror: "网店栏头应为4-25个字！" });
	$('#linkman').formValidator({onshow:"请输入联系人",onfocus:'2～6个字，不能填写电话和特殊符号'}).regexValidator({ regexp: "\\S+", onerror: "请输入联系人" }).regexValidator({ regexp: "^(.){2,6}$", onerror: "联系人不足2个字" }).regexValidator({ regexp: "^[\\w\\d\\s\\u4e00-\\u9fa5]*$", onerror: "联系人不能填写特殊符号" });
	$("#linktel").formValidator({onshow:"请填写电话号码",onfocus: "请正确填写电话号码，"}).regexValidator({ regexp: "(^(0\\d{2,3})?-?([2-9]\\d{6,7})(-\\d{1,5})?$)|(^((\\(\\d{3}\\))|(\\d{0}))?(13|14|15|18)\\d{9}$)|(^(400|800)\\d{7}(-\\d{1,4})?$)|(^(95013)\\d{6,8}$)", onerror: "电话填写错误。请参照格式填写：87654321或138********" });
	$("#about").formValidator({onshow:"请填写商家介绍",onfocus: "10~2000个字之间" }).regexValidator({ regexp: "^[\\s\\S]*$", onerror: "请填写商家介绍" }).regexValidator({ regexp: "^[\\s\\S]{10,}$", onerror: "商家介绍不足10个字" }).regexValidator({ regexp: "^([\\s\\S]){10,2000}$", onerror: "内容应在10~2000个字之间" });

});
<s:if test="#session.code=='webkey_error'">
	ShowAlert('提示','此地址己注册过',340,80);
</s:if>
<s:if test="#session.code=='profile_final'">
	ShowAlert('提示','更新成功',340,80);
</s:if>
var ccids=new Array();
<s:iterator id="c" value="%{channels}" status="st" >
ccids[ccids.length]=new Array(<s:property value="#c.id"/>,<s:property value="#c.parentId"/>,'<s:property value="#c.channel.channelName"/>');
</s:iterator>
function onchannel(parentId){
	$('#ccid').empty();
	//$('#ccid').append("<option value=''>请选择类别</option>");   
   for(i=0;i<ccids.length;i++){
   	if(parentId == ccids[i][1]){
		$('#ccid').append("<option value='"+ccids[i][0]+"'>"+ccids[i][2]+"</option>");
   	}
   }
}
</script>
</body>
</html>
